home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIDemos.lzh / Cryptoburners_Hunt7Oct.lha / Install < prev    next >
Text File  |  1980-01-16  |  3KB  |  154 lines

  1. ;****************************
  2. (set #readme-file "ReadMe")     ;name of readme file
  3. ;****************************
  4. ;----------------------------
  5. ; checks if given program is installed, if not abort install
  6. ; #program - to check
  7.  
  8. (procedure P_ChkRun
  9.   (if
  10.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  11.     ("")
  12.     (abort
  13.       (cat
  14.     "You must install \"" #program "\" first!\n"
  15.     "It must be accessible via the path.\n"
  16.     "You can find it in the WHDLoad package."
  17.       )
  18.     )
  19.   )
  20. )
  21.  
  22. (procedure P_ChkRun_XFD
  23.   (if
  24.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  25.     ("")
  26.     (abort
  27.       (cat
  28.     "You must install \"" #program "\" first!\n"
  29.     "It must be accessible via the path.\n"
  30.     "You can find it in the XFD package."))))
  31.  
  32. (procedure P_ChkRun_ADF
  33.    (if
  34.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  35.     ("")
  36.     (abort
  37.       (cat
  38.     "You must install \"" #program "\" first!\n"
  39.     "It must be accessible via the path.\n"
  40.     "You can find it in the UnADF package."))))
  41. ;----------------------------
  42. ; Wait for inserting disk
  43. ; IN:  #AD_disk - name of disk
  44. ; OUT: -
  45.  
  46. (procedure P_disk
  47.     (message ("Ensure the file HUNTFOR7THOCTOBER.ADF is available in RAM:"))
  48. )
  49.  
  50. ;****************************
  51.  
  52. (if
  53.   (exists #readme-file)
  54.   (if
  55.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  56.     ("")
  57.     (run ("SYS:Utilities/More %s" #readme-file))
  58.   )
  59. )
  60.  
  61. (set #program "WHDLoad")
  62. (P_ChkRun)
  63.  
  64. (set #program "xfddecrunch")
  65. (P_ChkRun_XFD)
  66.  
  67. (set #program "UnADF")
  68. (P_ChkRun_ADF)
  69.  
  70. (set @default-dest
  71.   (askdir
  72.     (prompt ("Where should \"%s\" be installed?\nA drawer \"%s\" will be automatically created." @app-name @app-name))
  73.     (help @askdir-help)
  74.     (default @default-dest)
  75.     (disk)
  76.   )
  77. )
  78. (set #dest (tackon @default-dest @app-name))
  79. (if
  80.   (exists #dest)
  81.   (
  82.     (set #choice
  83.       (askbool
  84.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted?" #dest))
  85.         (default 1)
  86.         (choices "Delete" "Skip")
  87.         (help @askbool-help)
  88.       )
  89.     )
  90.     (if
  91.       (= #choice 1)
  92.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  93.     )
  94.   )
  95. )
  96. (makedir #dest
  97.   (help @makedir-help)
  98.   (infos)
  99. )
  100.  
  101. ;----------------------------
  102.  
  103. (copyfiles
  104.   (help @copyfiles-help)
  105.   (source ("Hunt.Slave"))
  106.   (dest #dest)
  107. )
  108. (copyfiles
  109.   (help @copyfiles-help)
  110.   (source ("Hunt.info"))
  111.   (dest #dest)
  112. )
  113. (if
  114.   (exists #readme-file)
  115.   (copyfiles
  116.     (help @copyfiles-help)
  117.     (source #readme-file)
  118.     (dest #dest)
  119.   )
  120. )
  121. (if
  122.   (exists ("Readme.info"))
  123.   (copyfiles
  124.     (help @copyfiles-help)
  125.     (source ("Readme.info"))
  126.     (dest #dest)
  127.   )
  128. )
  129.  
  130. ;----------------------------
  131.  
  132.  
  133. (P_disk)
  134.  
  135.   (run ("UnADF RAM:huntfor7thoctober.adf DEST=RAM:"))
  136.   
  137.  
  138. (if
  139.   (= 0 (run ("xfddecrunch \"RAM:the hunt for 7th october/1\" \"RAM:HUNT.BIN\" >CON:///1000//CLOSE")))
  140.   ("")
  141.   (abort "\"xfddecrunch\" has failed to decompress the demo")
  142. )
  143. (copyfiles
  144.   (help @copyfiles-help)
  145.   (source ("RAM:HUNT.BIN"))
  146.   (dest #dest)
  147. )
  148. ;----------------------------
  149.  
  150. (run ("Delete RAM:the hunt for 7th october/ ALL QUIET FORCE"))
  151. (run ("Delete RAM:huntfor7thoctober.adf ALL QUIET FORCE"))
  152. (run ("Delete ram:hunt.bin ALL QUIET FORCE"))
  153. (exit)
  154.